package com.hexinfo.dmpro.data.disaster.recovery.backups.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hexinfo.dmpro.common.utils.CommonConstants;
import com.hexinfo.dmpro.data.disaster.recovery.backups.model.DisasterRecoveryFilter;
import com.hexinfo.dmpro.data.disaster.recovery.backups.dao.DisasterRecoveryFilterMapper;
import com.hexinfo.dmpro.data.disaster.recovery.backups.service.DisasterRecoveryFilterService;
import org.springframework.stereotype.Service;

/**
 * 生产数据灾备过滤清单
 *
 * @author wz.li
 * @date 2023-10-09 18:54:26
 */
@Service
public class DisasterRecoveryFilterServiceImpl extends ServiceImpl<DisasterRecoveryFilterMapper, DisasterRecoveryFilter> implements DisasterRecoveryFilterService {

    @Override
    public Page queryList(Page page, DisasterRecoveryFilter disasterRecoveryFilter) {
        LambdaQueryWrapper<DisasterRecoveryFilter> wrapper = Wrappers.lambdaQuery();
        wrapper.eq(DisasterRecoveryFilter::getDel,CommonConstants.STATUS_NORMAL);
        Page returnPage = this.baseMapper.selectPage(page, wrapper);
        return returnPage;
    }
}
